The present invention relates generally to video data processing, and more particularly, to video encoding that dynamically adjusts the quantization used to encode a video signal.
In the United States and elsewhere, standards for digital television have incorporated, at least in part, the Moving Picture Experts Group or MPEG signal protocol. The MPEG-2 systems standard is described in xe2x80x9cISO/IEC 13818-1xe2x80x9d and the MPEG-2 video compression standard is described in xe2x80x9cISO/IEC 13818-2.xe2x80x9d
The MPEG-2 standard defines a complex syntax which contains a mixture of data and control information. Some of this control information is used to define signals having several different formats including images, having differing numbers of picture elements (pixels) per line, differing numbers of lines per frame or field and differing numbers of frames or fields per second. In addition, the basic syntax of the MPEG-2 Main Profile defines the compressed MPEG-2 bit stream representing a sequence of images in six layers, the sequence layer, the group pictures layer, the picture layer, the slice layer, the macro block layer, and the block layer. Each of these layers is introduced with control information and xe2x80x9cstuffingxe2x80x9d characters. The stuffing characters are inserted as needed to ensure that the data rate of the input data stream matches the rate at which pictures are displayed.
To effectively receive the digital images, a decoder must recognize the control portions, extract the necessary control information, and use the extracted data to process the video signal information. One piece of information that is specified for each sequence layer is the video buffering verifier (VBV) buffer size. The VBV buffer size value specifies a number of bits of input data from the video sequence which must be stored in the input buffer of the decoder before the video sequence may be decoded. If this number of bits is stored when the decoding operation begins, the input buffer will neither become too full (overflow) or become empty (underflow) during the processing of the video sequence.
In the production of TV programming, it is desirable to perform video splicing, which is the insertion of material from one program or commercial into another program. The different program materials may vary in complexity and thus require different coding parameters such as VBV buffer size. It should be appreciated that it is not convenient to change VBV buffer size each time program material is spliced, in order to avoid VBV buffer overflow or underflow.
In general, splicing of MPEG bit streams requires managing buffer fullness of the video buffers. Moreover, the buffer fullness corresponds to a delay representative of the amount of time that a byte spends in the buffer. When splicing two separately encoded bit streams, the delay at the splice point will not usually match. This mismatch in delay can cause the video buffer of the video decoder to overflow or underflow.
Further, image quality is essential to satisfying consumer demand for high definition television signals. Tight control over the fullness level of the video buffer is essential to encoding a video signal having splice points which satisfy the constraints of the SMPTE 312M standard proposed by the Society of Motion Picture and Television Engineers (SMPTE). Thus there is a need for a splicing method and system that obviates changes of VBV buffer size at splice points, while precluding buffer overflow or underflow.
The present invention fulfills the above need, as well as others, by providing a video encoder with a rate control processor suitable for splicing. In general, an exemplary embodiment includes a rate control processor providing a quantizer with appropriate quantization values for respective blocks of the video signal being encoded. To this end, the rate control processor is operable to (i) allocate a target number of bits to the first video frame that precedes a desired splice point in presentation order, (ii) determine an estimated decoding delay for a second video frame of the video signal that follows the desired splice point in encode order, and/or (iii) determines a correction factor based upon a difference between the estimated decoding delay and a splice point decoding delay that is required to achieve a seamless splice point at the desired splice point.
An exemplary method of encoding a video signal according to the present invention calculates the quantization requirements for a first video signal into which a second video signal will be spliced, according to the volume of coded information of both video signals.